package com.ljj.bean;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class AppLauncher {
    public static void main(String[] args) {

        ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");

        Product product = (Product) context.getBean("product");
        Student student = (Student) context.getBean("student");

        System.out.println(product);
        System.out.println(student);

        ((ClassPathXmlApplicationContext) context).close();
    }
}
